var API = {
  // https://lululemon.omnimkt.com/2020cny/?debug=1
  DOMAIN: "",
  //用户信息
  userInfo: {},
  send: function (url, type, data, cb) {
    $.ajax({
      url: API.DOMAIN + url,
      type: type,
      dataType: "json",
      data: data,
      success: function (res) {
        cb(res);
      },
      error: function () {
        // cb(null);
      }
    });
  },
  info: function (data,cb) {
    var url = "api/info";
    var type = 'GET'
    var data = data;
    API.send(url, type, data, cb)
  },
  register: function (data,cb) {
    var url = "api/register";
    var type = 'GET'
    var data = data;
    API.send(url, type, data, cb)
  },
  saveimg:function(data,cb){
    var url = "api/saveimg";
    var type = 'GET'
    var data = data;
    API.send(url, type, data, cb)
  },
  uploadImg:function(data,cb){
    var url = "api/uploadImg";
    var type = 'POST'
    var data = data;
    API.send(url, type, data, cb)
  },
  shareProduct:function(data,cb){
    var url = "api/shareProduct";
    var type = 'GET'
    var data = data;
    API.send(url, type, data, cb)
  },
  memeList: function(cb){
    var url = "api/memeList";
    var type = 'GET'
    var data = data;
    API.send(url, type, data, cb)
  },
  nowx_saveimg:function(data,cb){
    var url = "api/nowx_saveimg";
    var type = 'GET'
    var data = data;
    API.send(url, type, data, cb)
  },
}